<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('goods_orders', function (Blueprint $table) {
            $table->text('refund_reason')->nullable()->comment('退款原因');
            $table->integer('refund_operator_id')->default('0')->nullable()->comment('退款操作人');
            $table->timestamp('refunds_at')->nullable()->comment('退款时间');
            $table->string('refund_id')->nullable()->comment('退款订单号');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('goods_orders', function (Blueprint $table) {
            $table->dropColumn('refund_reason');
            $table->dropColumn('refund_operator_id');
            $table->dropColumn('refunds_at');
            $table->dropColumn('refund_id');
        });
    }
};
